package io.bdmc.modules.bss.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.bdmc.modules.sys.controller.AbstractController;
import io.bdmc.common.utils.MyMap;
import io.bdmc.common.utils.MyPage;
import io.bdmc.common.utils.R;
import io.bdmc.modules.bss.entity.BarSending;
import io.bdmc.modules.bss.model.SendingParam;
import io.bdmc.modules.bss.service.BarSendingService;


import org.springframework.beans.factory.annotation.Autowired;
/**
 * <p>
 * 设备发送指令表 前端控制器
 * </p>
 *
 * @author HuangLu
 * @since 2019-01-10
 */
@RestController
@RequestMapping("/bss/send")
public class BarSendingController extends AbstractController {

    @Autowired
    private BarSendingService sendSvs;
    @RequestMapping("/list")
	//@RequiresPermissions("sys:dev:list")
	public R all(SendingParam params){
        //查询列表数据
        MyPage<BarSending> myPage = new MyPage<BarSending>(params.getCurrent(), params.getSize());
        MyPage<BarSending> map = sendSvs.mySelectPage(myPage, params);
		return R.ok().putData(MyMap.ok(map.getRecords(), map.getTotal()));
    }
}

